package com.neusoft.NEPS.entity;

import java.io.Serializable;

public class User implements Serializable{
    private String phoneNumber;
    private String userName;
    private String password;
    private String remark;

    public User(String phoneNumber, String password) {
        this.phoneNumber = phoneNumber;
        this.password = password;
    }

    public User(String phoneNumber, String userName, String remark, String password){
        this.phoneNumber = phoneNumber;
        this.userName = userName;
        this.remark = remark;
        this.password = password;
    }
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public String getRemark() {
        return remark;
    }

    @Override
    public boolean equals(Object o) {
        if(o instanceof User uo){
            return (uo.getUserName().equals(this.phoneNumber) && uo.getPassword().equals(this.password));
        }
        return false;
    }
}
